package com.fsnbigdata.service.impl;
import com.fsnbigdata.service.api.ListQuadratItemService;
import org.springframework.roo.addon.layers.service.annotations.RooServiceImpl;
import com.fsnbigdata.domain.ListQuadrat;
import com.fsnbigdata.domain.ListQuadratItem;
import com.fsnbigdata.repository.ListQuadratItemRepository;
import io.springlets.data.domain.GlobalSearch;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * = ListQuadratItemServiceImpl
 *
 * TODO Auto-generated class documentation
 *
 */
@RooServiceImpl(service = ListQuadratItemService.class)
@Service
@Transactional(readOnly = true)
public class ListQuadratItemServiceImpl implements ListQuadratItemService {

    /**
     * TODO Auto-generated attribute documentation
     *
     */
    private ListQuadratItemRepository listQuadratItemRepository;

    /**
     * TODO Auto-generated constructor documentation
     *
     * @param listQuadratItemRepository
     */
    @Autowired
    public ListQuadratItemServiceImpl(ListQuadratItemRepository listQuadratItemRepository) {
        setListQuadratItemRepository(listQuadratItemRepository);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return ListQuadratItemRepository
     */
    public ListQuadratItemRepository getListQuadratItemRepository() {
        return listQuadratItemRepository;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param listQuadratItemRepository
     */
    public void setListQuadratItemRepository(ListQuadratItemRepository listQuadratItemRepository) {
        this.listQuadratItemRepository = listQuadratItemRepository;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param entity
     * @return ListQuadratItem
     */
    @Transactional
    public ListQuadratItem save(ListQuadratItem entity) {
        return getListQuadratItemRepository().save(entity);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return ListQuadratItem
     */
    public ListQuadratItem findOne(Long id) {
        return getListQuadratItemRepository().findOne(id);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return ListQuadratItem
     */
    public ListQuadratItem findOneForUpdate(Long id) {
        return getListQuadratItemRepository().findOneDetached(id);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @return List
     */
    public List<ListQuadratItem> findAll(Iterable<Long> ids) {
        return getListQuadratItemRepository().findAll(ids);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param listQuadrat
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public Page<ListQuadratItem> findByListQuadrat(ListQuadrat listQuadrat, GlobalSearch globalSearch, Pageable pageable) {
        return getListQuadratItemRepository().findByListQuadrat(listQuadrat, globalSearch, pageable);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @param listQuadrat
     * @return Long
     */
    public long countByListQuadrat(ListQuadrat listQuadrat) {
        return getListQuadratItemRepository().countByListQuadrat(listQuadrat);
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Class
     */
    public Class<ListQuadratItem> getEntityType() {
        return ListQuadratItem.class;
    }

    /**
     * TODO Auto-generated method documentation
     *
     * @return Class
     */
    public Class<Long> getIdType() {
        return Long.class;
    }
}
